package com.coolwen.controller;

import com.coolwen.service.GoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Eoly on 2016/12/4.
 */
@Controller
@RequestMapping("/goods")
public class GoodsTypeController {

    @Autowired
    GoodsTypeService goodsTypeService;

    @RequestMapping("/all-types")
    public String findAllType(Model model){
        model.addAttribute("types",goodsTypeService.findAllGoodsType());
        return "/web/open_team";
    }
}
